﻿<%@ page contentType="text/html; charset=utf-8" language="java"
	errorPage=""%>
<%@taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>
<html>
	<head>
		<TITLE>链接列表</TITLE>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<LINK href="./jsp/manage/css/style.css" type=text/css rel=stylesheet>
		<style type="text/css" media="all">
@import "./jsp/manage/css/global.css";

@import "./jsp/manage/thickbox-code/thickbox.css";
</style>
		<link rel="stylesheet" id='skin' type="text/css"
			href="./jsp/manage/css/ymPrompt.css" />
		<script src="./jsp/manage/js/jquery-compressed.js"
			type="text/javascript"></script>
		<script src="./jsp/manage/js/thickbox.js" type="text/javascript"></script>
		<script src="./jsp/manage/js/global.js" type="text/javascript"></script>
		<script src="./jsp/manage/js/mon.js" type="text/javascript"></script>
		<script type="text/javascript" src="./jsp/manage/js/ymPrompt.js"></script>
		<script language="javascript" type="text/javascript">
		
		function fnOnPageChanged(page) {
			var keyword=document.getElementById("keyword").value;
			var keywordType=document.getElementById("keywordType").value;
			var radiooption=document.getElementById("radiooption").value;
			var url = '<%=request.getContextPath()%>/faqManage.do?method=faqlist&keyword='+keyword+'&keywordType='+keywordType+'&radiooption='+radiooption+'&pageNow='+page;
			document.location.href = url;
		}
		</script>


		<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 5px;
}
-->
</style>
	</head>
	<body>
		<div id="content">
			<TABLE class=border cellSpacing=1 cellPadding=2 width="100%"
				align=center border=0>
				<TBODY>
					<TR class=topbg>
						<TD align=middle colSpan=2 height=22>
							<STRONG>链接管理</STRONG>
						</TD>
					</TR>
					<TR class=topbg>
						<TD>
							<STRONG> <a
								href="<%=request.getContextPath()%>/hotlinkManage.do?method=hotlinklist">链接管理首页</a>
								[ <a
								href="<%=request.getContextPath()%>/hotlinkManage.do?method=hotlinkadd">添加链接</a>
								]</STRONG>
						</TD>
					</TR>
					<TR class=topbg>
						<TD>
							<br>
							<form name=form
								action="<%=request.getContextPath()%>/hotlinkManage.do?method=hotlinklist"
								method=post>
								<TABLE class=border cellSpacing=1 cellPadding=2 width="100%"
									align=center border=0>
									<TR class=tdbg>
										<TD width=100 height=30>
											<STRONG>链接选项：</STRONG>
										</TD>
										<TD>
											<INPUT onclick=submit(); type=radio  id="all" value=all CHECKED
												name=radiooption <c:if test="${radiooption=='all'}" > checked</c:if>>
											所有链接 &nbsp;&nbsp;&nbsp;&nbsp;
											<INPUT onclick=submit(); type=radio id="hxiangguanlianjielink" value=xiangguanlianjielink name=radiooption <c:if test="${radiooption=='xiangguanlianjielink'}" > checked</c:if>>
											CALIS相关链接 &nbsp;&nbsp;&nbsp;&nbsp;
											<INPUT onclick=submit(); type=radio id="chengyuanguanlink" value=chengyuanguanlink name=radiooption <c:if test="${radiooption=='chengyuanguanlink'}" > checked</c:if>>
											成员馆 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
											<INPUT onclick=submit(); type=radio id="fuwutuijielink" value=fuwutuijielink name=radiooption <c:if test="${radiooption=='fuwutuijielink'}" > checked</c:if>>
											服务推介 &nbsp;&nbsp;&nbsp;&nbsp;
											<INPUT onclick=submit(); type=radio id="gongxiangziyuanlink" value=gongxiangziyuanlink name=radiooption <c:if test="${radiooption=='gongxiangziyuanlink'}" > checked</c:if>>
											共享资源 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
											<INPUT onclick=submit(); type=radio id="xibeizhongxinchengyuanguanlink" value=xibeizhongxinchengyuanguanlink name=radiooption <c:if test="${radiooption=='xibeizhongxinchengyuanguanlink'}" > checked</c:if>>
											西北地区各省中心 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
											<INPUT onclick=submit(); type=radio id="xibeizhongxinfuwutuijielink" value=xibeizhongxinfuwutuijielink name=radiooption <c:if test="${radiooption=='xibeizhongxinfuwutuijielink'}" > checked</c:if>>
											西北中心服务推介 &nbsp;&nbsp;&nbsp;&nbsp;
											<INPUT onclick=submit(); type=radio id="xibeizhongxingongxiangziyuanlink" value=xibeizhongxingongxiangziyuanlink name=radiooption <c:if test="${radiooption=='xibeizhongxingongxiangziyuanlink'}" > checked</c:if>>
											西北中心共享资源 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
										</TD>
									</TR>
								</TABLE>
							</form>
						</TD>
					</TR>
				</TBODY>
			</TABLE>
			<table border="0" width="100%" align="center">
				<!-- 一级table 提供“搜索功能” -->
				<tr>
					<td align="center">
						<form
							action="<%=request.getContextPath()%>/hotlinkManage.do?method=hotlinklist"
							method="post">
							<SELECT size=1 name=keywordType>
								<OPTION value=title selected>
									链接名称
								</OPTION>
								<OPTION value=url selected>
									链接地址
								</OPTION>
							</SELECT>
							<input name="keyword" type="text" size="40" maxlength="40" />
							<input name="button" type="submit" value="查找" />
						</form>
					</td>
				</tr>
			</table>
			<table width="100%" border="0" cellspacing="0" cellpadding="0"
				class="data">
				<tr>
					<th align="center" nowrap="nowrap">
						<div align="center">
							ID
						</div>
					</th>
					<th width="21%" align="center" nowrap="nowrap">
						名称
					</th>
					<th width="50%" align="center" nowrap="nowrap">
						链接
					</th>
					<th width="50%" align="center" nowrap="nowrap">
						链接2
					</th>
					<th width="6%" align="center" nowrap="nowrap">
						类型
					</th>
					<th width="6%" align="center" nowrap="nowrap">
						排序值
					</th>
					<th width="11%" align="center" nowrap="nowrap">
						操作
					</th>
				</tr>
				<c:forEach items="${hotlinklist}" var="hotlink">
					<c:if test="${hotlink.id%2==1}">
						<c:set var="rowtype" value="odd" />
					</c:if>
					<c:if test="${hotlink.id%2==0}">
						<c:set var="rowtype" value="even" />
					</c:if>
					<tr class="${rowtype}" onMouseOver="this.className = 'row_over';"
						onMouseOut="this.className = '${rowtype}';">
						<td width="6%" align="center" nowrap="nowrap">
							${hotlink.id}
						</td>
						<td colspan="1" align="left" nowrap="nowrap">
							${hotlink.title}
						</td>
						<td align="right" nowrap="nowrap">
							<div align="center">
								${hotlink.url}
							</div>
						</td>
						<td align="right" nowrap="nowrap">
							<div align="center">
								${hotlink.urltwo}
							</div>
						</td>
						<td align="center" nowrap="nowrap">
							<font color="red"> 
								<c:choose>
									<c:when test="${hotlink.type=='xiangguanlianjielink'}">
										CALIS相关链接
									</c:when>
									<c:when test="${hotlink.type=='chengyuanguanlink'}">
										成员馆
									</c:when>
									<c:when test="${hotlink.type=='fuwutuijielink'}">
										服务推介
									</c:when>
									<c:when test="${hotlink.type=='gongxiangziyuanlink'}">
										共享资源
									</c:when>
									<c:when test="${hotlink.type=='xibeizhongxinchengyuanguanlink'}">
										西北地区各省中心
									</c:when>
									<c:when test="${hotlink.type=='xibeizhongxinfuwutuijielink'}">
										西北中心服务推介
									</c:when>
									<c:when test="${hotlink.type=='xibeizhongxingongxiangziyuanlink'}">
										西北中心共享资源
									</c:when>
								</c:choose> 
							</font>
						</td>
						<td colspan="1" align="left" nowrap="nowrap">
							${hotlink.sortNumber}
						</td>
						<td align="center" nowrap="nowrap">
							<a
								href="<%=request.getContextPath()%>/hotlinkManage.do?method=hotlinkedit&hotlinkid=${hotlink.id}">编辑</a>
							|
							<a
								href="<%=request.getContextPath()%>/hotlinkManage.do?method=hotlinkdel&hotlinkid=${hotlink.id}"
								onClick="return confirm('您确定要删除 ${hotlink.title} ？');">删除</a>
						</td>
					</tr>
				</c:forEach>
				<tr>
					<td colspan="15" align="center" bgcolor="#FCFCFC">
					<input type="hidden" id="keywordType" value="${keywordType}">
					<input type="hidden" id="keyword" value="${keyword}">
					<input type="hidden" id="radiooption" value="${radiooption}">
						<div align="left">
							<span style="font-size: 13px">共<b>${entryTatal}</b>
								个链接&nbsp;&nbsp; <a
								href="<%=request.getContextPath()%>/hotlinkManage.do?method=hotlinklist&keyword=${keyword}&keywordType=${keywordType}&radiooption=${radiooption}&pageNow=1">首页
							</a> <c:choose>
									<c:when test="${pageNow>1}">
										<a
											href="<%=request.getContextPath()%>/hotlinkManage.do?method=hotlinklist&keyword=${keyword}&keywordType=${keywordType}&radiooption=${radiooption}&pageNow=${pageNow-1}">上一页</a>
									</c:when>
									<c:otherwise> 上一页 </c:otherwise>
								</c:choose> <c:choose>
									<c:when test="${pageNow<pageTatal}">
										<a
											href="<%=request.getContextPath()%>/hotlinkManage.do?method=hotlinklist&keyword=${keyword}&keywordType=${keywordType}&radiooption=${radiooption}&pageNow=${pageNow+1}">下一页</a>
									</c:when>
									<c:otherwise> 下一页 </c:otherwise>
								</c:choose> <a
								href="<%=request.getContextPath()%>/hotlinkManage.do?method=hotlinklist&keyword=${keyword}&keywordType=${keywordType}&radiooption=${radiooption}&pageNow=${pageTatal}">尾页</a>
								页次：<strong><font color="red">${pageNow}</font>/${pageTatal}</strong>页
								&nbsp;共<b>${entryTatal}</b>个链接 共 <b>${pageTatal}</b>
								页&nbsp;&nbsp;转到第 <select name="pagejump"
									onChange="fnOnPageChanged(this.value);">

									<c:forEach begin="1" end="${pageTatal}" var="i" step="1">
										<c:if test="${pageNow==i}">
											<option value="${i}" selected>
												&nbsp;&nbsp;${pageNow} &nbsp;&nbsp;
											</option>
										</c:if>
										<c:if test="${pageNow!=i}">
											<option value="<c:out value="${i}"/>">
												&nbsp;&nbsp;
												<c:out value="${i}" />
												&nbsp;&nbsp;
											</option>
										</c:if>
									</c:forEach>
								</select> 页</span>
						</div>
					</td>
				</tr>
			</table>
		</div>
	</body>
</html>
